/*
2021-11-21
https://www.acwing.com/problem/content/4079/
*/ 
#include<cstring>
#include<iostream>
#include<algorithm>

using namespace std;

int main()
{
    string str;
    cin>>str;
    int sum=0;
    for(auto t:str)
    {
        if(t=='A') sum+=1;
        else if(t=='1') sum+=10;
        else sum+=t-'0';
    }
    cout<<sum<<endl;
    return 0;
}
